package ar.com.mooral.crohn;

import java.util.Calendar;

import android.app.Notification;
import android.app.NotificationManager;
import android.content.Context;
import android.content.BroadcastReceiver;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

/** All receiver classes must extend BroadcastReceiver */
public class CrohnAlarmReceiver extends BroadcastReceiver {

	 public void onReceive(Context context, Intent intent) {
	   try {
	     Bundle bundle = intent.getExtras();
	     String message = bundle.getString("alarm_message");
	     Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
	    } catch (Exception e) {
	     Toast.makeText(context, "There was an error somewhere, but we still received an alarm", Toast.LENGTH_SHORT).show();
	     e.printStackTrace();

	    }
	 }
	
}